Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/webview bridge #66

Merged
merged 11 commits into from
Sep 10, 2023
Merged

Feat/webview bridge #66

merged 11 commits into from
Sep 10, 2023

Conversation

dogdduddy
Copy link
Collaborator

웹뷰 브릿지 연결

  • 브릿지 메서드명 변경
  • 기능 구현 (route, navigation, token, navigate)

추가적으로 필요한 기능

  • share을 구현할 때 웹과 맞춰 딥링크를 생성해줘야 할것 같습니다.

비고

  • back 기능은 android 자체적으로 백스택 관리가 가능해서 구현하지 않았습니다.

Copy link
Member

@soopeach soopeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니당

Comment on lines 38 to 40
when(JSONObject(data).getString("route")) {
Route.EDIT_RESTAURANT.route-> {
val restaurantId = JSONObject(data).getString("restaurantId").toInt()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSONObject(data)를 함수 내의 최상위 변수로 두면 중복을 줄일 수 있을 것 같아요!

// webView.canGoBack으로 뒤로가기 처리 완료해서 비워뒀습니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오..!! 그럼 알아서 백버튼 눌렀을 때 클라이언트 네비게이션 기준 backstack이 비워지는건가요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 아래 코드를 보니... webview자체에 goback이라는 메서드가 있군요

import org.gdsc.presentation.model.Route
import org.json.JSONObject

const val WEB_BASE_URL = "https://jmt-matzip.dev/detail/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어 근데 이거 Base Url 인데 detail 이 포함되는게 맞나요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어라라 ㅋㅋㅋㅋㅋ

// 주소는 변경 되어야 함, 현재는 Lucy LocalHost 테스트
intent.putExtra(
"url",
"http://172.20.10.13:3000/detail/$restaurantId"
"$WEB_BASE_URL$restaurantId"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WEB_BASE_URL에 코멘트 남겨놨는데 그거 확인해보시고 변경사항있으면 요쪽도 수정같이 하면 될 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이놈도 수정 완료했슴다

@soopeach soopeach merged commit bad6aff into develop Sep 10, 2023
dogdduddy pushed a commit that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants